//
//  WMEFindModel.m
//  everyDay_duiTang
//
//  Created by 恩叔 on 16/1/18.
//  Copyright © 2016年 enshu. All rights reserved.
//

#import "WMEFindModel.h"

@implementation WMEFindModel

-(void)dealloc
{
    [_group_id release];
    [_content_type release];
    [_group_name release] ;
    [_name release];
    [_icon_url release];
    [_target release];
    [_group_items release];
    [_filter_id  release];
    [_uri release];
    [_items release];
    [_itemsTarget release];
    [_itemsImage release];
    [_itemsName release];
    [_related_theme_groupName release];
    [_desc release];
    [_image release];

    [super dealloc];
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"group_items"]) {
        self.group_items = value[@"group_items"];
    }
    if ([key isEqualToString:@"data_src"]) {
        self.filter_id = value[@"filter_id"];
        self.content_type = value[@"content_type"];
        self.uri = value[@"uri"];
    }
    if ([key isEqualToString:@"related_theme_group"]) {
        for (NSDictionary *temp in value) {
            for (NSDictionary *dic in temp[@"items"]) {
                self.itemsTarget = dic[@"target"];
                self.itemsName = dic[@"name"];
                self.itemsImage = dic[@"image"];
            }
            self.related_theme_groupName = temp[@"name"];
        }
        
    }
}

@end
